﻿package Message.Public
{
    import Engine.RMI.*;
    import Framework.Serialize.*;

    public class EPlayerItemPosType extends Object
    {
        public var __value:int;
        public static const _EPlayerItemPosTypeBag:int = 0;
        public static const _EPlayerItemPosTypeWarehouse:int = 1;
        public static const _EPlayerItemPosTypeGMGift:int = 2;
        public static const _EPlayerItemPosTypeRole:int = 3;
        public static const _EPlayerItemPosTypeTask:int = 4;
        public static const _EPlayerItemPosTypeGem:int = 5;
        public static const _EPlayerItemPosTypeMount:int = 6;
        public static const _EPlayerItemPosTypeEmbed:int = 7;
        public static const _EPlayerItemPosTypeWardrobe:int = 8;
        public static const _EPlayerItemPosTypeDecompose:int = 9;
        public static const _EPlayerItemPosTowerScan:int = 13;
        public static const _EPlayerItemPosGodHead:int = 14;
        public static const _EPlayerItemPosLottery:int = 15;
        public static const _EPlayerItemPosRune:int = 16;
        public static const _EPlayerItemPosTypePet:int = 1000;
        public static const _EPlayerItemPosTypePetEnd:int = 1100;
        public static const _EPlayerItemPosTypeSprite:int = 2000;
        public static const _EPlayerItemPosTypeSpriteEnd:int = 2100;
        public static const _EPlayerItemPosTypeDefenseCopyBag:int = 3000;
        public static const _EPlayerItemPosTypeDefenseCopyRole:int = 3100;
        public static const _EPlayerItemPosTypeFashion:int = 4000;
        public static const _EPlayerItemPosTypeFashionEnd:int = 4100;

        public function EPlayerItemPosType(param1:int)
        {
            this.__value = param1;
            return;
        }// end function

        public function value() : int
        {
            return this.__value;
        }// end function

        public function __write(param1:SerializeStream) : void
        {
            param1.writeShort(this.__value);
            return;
        }// end function

        public static function convert(param1:int) : EPlayerItemPosType
        {
            return new EPlayerItemPosType(param1);
        }// end function

        public static function __read(param1:SerializeStream) : EPlayerItemPosType
        {
            var _loc_2:* = param1.readShort();
            if (_loc_2 < 0 || _loc_2 >= 4101)
            {
                throw new MarshalException();
            }
            return EPlayerItemPosType.convert(_loc_2);
        }// end function

    }
}
